package com.yilin.medical.http;

import com.yilin.medical.activity.BaseActivity;
import com.yilin.medical.utils.JxNetUtils;
import com.yilin.medical.utils.ToastUntil;

/**
 * Created by Max on 2014/12/8 0008.
 */
public class BaseStringHttpResponseListener extends JxStringHttpResponseListener {

    private BaseActivity mContext;
    public BaseStringHttpResponseListener(BaseActivity context){
        mContext = context;
    }

    private boolean flag = true;

    @Override
    public void onStart() {
        super.onStart();
        if(JxNetUtils.isConnected(mContext)) {
            mContext.showProgressDialog();
        }else {
            ToastUntil.showShortToast(mContext,"无网络连接");
        }
    }

    @Override
    public void onSuccess(int statusCode, String content) {
        super.onSuccess(statusCode, content);
    }

    @Override
    public void onFinish() {
        super.onFinish();
        mContext.removeProgressDialog();
    }

}
